package com.erli.exchange.mvc;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore
@Controller
@RequestMapping("/mvc/")
public class MvcController {

    @RequestMapping("/")
    public String index() {
        return "index";
    }

    @RequestMapping("/{pageName}")
    public String toPage(@PathVariable String pageName) {
        return pageName;
    }

    @RequestMapping("/{pagePath}/{pageName}")
    public String toPage(@PathVariable String pagePath,@PathVariable String pageName) {
        return pagePath+"/"+pageName;
    }
}
